Removed unused classes and fixed errors