Fixes to inheritance
Add tests for createRefClass