added .gitignore
PEP8 formatting, removed unused imports and trailing spaces