clear some code warnings, and add .gitignore