Modified so that Python 3 can declare the metaclass correctly.