Inherit base classes in right order

This can eliminate the need for a __init__ method.