Moving database queries to DB helper for better encapsulation.