Moved some more constructor code to defineClass