cleaned up classes and added destructors