Comple refactoring