Add documentation and minor formatting changes.