Added offset for endstop
removed unneeded post var if() from previous version