Refactor: applying principles from Bob Martin's Clean Code book