Refactor out common part of update/movement action.