Clean up writing to the results buffer.
Move the output parsing off of the main thread.