Made some code changes to correct output, added user documentation