Huge code refactoring started...