added a class name string to the primitive_class struct
implemented virtual functions
refactored some macros and primitive.h stuff to declutter from older styles