Added documentation.
Fixed grammatical errors.