Added support for single table inheritance - closes #49 and #30