Fix a class name py.test dislikes and some reliance on global state and test ordering.