clean up codes and add .gitignore file