I don't like nested classes, but here it is reasonable to use a nested class.