broke out db stuff and routes stuff into separate files