Clean up ctx.db in db module
Clean up imports in views