Python3 support

Quickest fix ever.

I also seem to have remove whitespace characters on empty lines...