Refactored documentation task.
Added docs to a couple places.