remove 900 lines of attempting to use a metaclass, use __new__ in the class instead