Improve bash results & add comments.
Add documentation.