Encapsulated db functions in DB class, and stored db object session.