Started refactoring into a class
PEP formatting