Shifted around some classes and refactored