Refactoring and codefixing done