Hacked in generic repository support and removed lots of persistence layer bloat