Add check to see if test db exists
clean up code