WIP mongoose models

More work towards a single model implementation. This is still failing
but it's getting closer to a useful implementation.