added csv creation functionality to display summary of results

* cleaned up extranneous comments
* made things more concise