added .gitignore and did some code cleanup