multiple refactors (encapsulation, readability, modularity, pep8)