Trying to work the database into the main code.