Some initial work on py3 compatibility.