moved from using sessions to using SQLite
Looks at the ENV variables to find out which database to use.
Cleans database before running.