Erk signaling dynamics and their role in germ layer patterning