Added abstract classes, and changed the way classes are defined