Motion refactoring