Refactoring for improving the code quality