Clarified the architecture a bit by renaming some classes and moving some implementation code closer to its home