removes redundancies

removes redundant variables and adds a .gitignore