Minor python3 adjustments.

- Got rid of some unnecessary list conversions
- Removed some warnings about integer conversion in tests