Add interface to register record type classes
Fix some bugs in enum type