Code refactoring to support clean code