Improved code quality and refactored code