Adds documentation.

Adds doc strings to functions.