Added a newClass.register() function that registers the class.