Improve documentation and output of program