moved db init and models to sane places