Refactored the actor move logic