Move db module from models, link to app