deep code refactoring.