Refactor movement class to make it more readable