Refactored to use UserCodeProblem subclasses.