Added separate database wrapper so that model classes can interact with it rather than the entire application