Fixed some syntax errors. added .gitignore

Does what it says on the tin.