Add model metadata

Refactor handling of parent and child nodes to hit the database a single time when reading