Two-dimension stepper control with potentiometers

Thank you for the help everyone. I added the missing braces like johnerrington suggested and was able to get everything working, however I'm having one other problem. For one of the two axes, the motor runs very slow and changing #define YMAX_DRIVER_PULSE_PERIOD_US doesn't seem to affect it. I'm having trouble understanding why, since the code is the same for each axis.