Implemented classes in an ugly way.