Custom transitions and refactoring