Moved around some classes so they are more reusable