Added gitignore and cleaned up some code.