slight improvements; use python2 names for types