Refactoring and refining