To correct the Z movement during the same layer, enable optimize Z moves.
I didn’t have a screen shot handy, but you will see the setting in this linked post:
Enable Z Axis - Unexpected Results
For the second item, Z velocity is configured in the controller.