Refactoring application