delete unnecessary files and fixed several bugs