Added much infrastructure (e.g., setUpProblem) for testing. Capturing is not in place yet.