Refactor actuator movement into two functions