Factor out function for writing common response headers.
Add Monte Carlo sim after Solver result.