Moved database connection stuff into a Database class