refactor db config out of model
setup to use layouts and partials, add layout and partials for header/footer