Delete unnecessary files and fix code