Added some javaDocs. Minor improvements. Added single print
functionality.