Fix formatting of output and some comments