string_types, StringIO from six pkg, other fixes