Added documentation and minor edits.