codegen: Added cases for inheritance, constructor; other minor fixes