Do complete refactoring