Added gitignore, cleaned up some code