Python 3 fixes using Six.

Using the wonderful Six library to get support for both Python 2 and 3.
Template fixes.

I removed the utility I had for input support because I was using six's,
but forgot to updated my templates to use six's as well.