Moved limit switch code for testing