Remove unused class.
Fix a problem with the case that pobj is None in get_state().