typo, doc, error

- removed a bunch of commented code
- added some documentation
- fix some pep8 warning (mostly line too long, indent)
- i.strip -> i.strip()