Merge pull request #1 from hunse/2to3

Changes to make code both python2.7 and python3 compatible
Minor python3 adjustments.

- Got rid of some unnecessary list conversions
- Removed some warnings about integer conversion in tests
Merge pull request #2 from hunse/2to3

Minor python3 adjustments.
Removed int cast, bad idea