Added and refactored some classes