fix problems and modify .gitignore