Refactored some classes which shared a single file