restructure models. add caching utility. set up instance. use sqlalchemy models/sessions.