cleaning up code, delete unused files, fix bugs