Initial model fix

This installs cleanly. I'm working on some sample data to dump in.

Sorry bout that last one; it was messy.