Add support for inherit
Tidy up