preliminary py3k compat; nicer response parsing; moved instance attrs to class