Extract model into own package

I guess this is how we do it?
A bunch of crappy DB stuff

I don't like most of this, but it sorta works for now