Updated the way it creates the database and the way it searches key values in the database