changed createSubclass to use deepExtend (to clone objects from superclass, rather thn to copy them by reference)