Added new interfaces and refactored some classes