First I’d correct your settings for the steps per mm. I’ll link a method I’ve shared.
Calibrating my X-carve 1000 - X-Carve - Inventables Community Forum
If your Z axis is going up instead of down, there is a number in $$ that needs to be changed. It is $3=4. You can see the chart here.