Added a parser for the output of the reducer and other bug fixes.