py3 compatible and PEP 8'd
Merge pull request #1 from dfee/master

py3 compatible and PEP 8'd