Clean Up
attempt to make changes to stream line code
added ability to purge database (not working)