Fix mode2 output whitespace, add stats reporting, re-arrange some sub lo...

...cations for code readability, replace some returns with if-blocks.

Regarding the returns, the returns were inside the main code block near the logical end of the script that were causing the main block to exit early before the new stats sub that I wanted to run at the very end so just wrapped that up with if blocks instead.