Used pyflakes to removed unneeded code.
PEP8 spacing corrected with `autopep8 --max-line-length 100 -a -i`