Adding limit switch code and absolute stage positioning