fix py3 and improve naming of some methods