re-add class inheritance, and add some generation fixes+features