Removing all unecessary files and tracking the database