Clean code and refactoring