Adjusted logic behind database

Working on how to first populate the DB