Cleaning up some debug code, properly tracking parser state.
Extracted all the debug output stuff into Spray.