python2-3 and code simplified in atod
tiny fixes to comments