Implement support for abstract models - include basic hierarchy tests. Closes #44.