Added some code to load the database.