Removed unused classes and added tests