Initial python 3 port. Doesn't work.