Refactoring and moving classes for easier testing / scaling