Abstracted away the db dependency.