Refactoring completely