Add documentation to the functions.

Some parameter types have been left blank as there is no indication from the
code on the type of parameter used.
Change tabs to spaces throughout the file
Merge pull request #6 from cswegger/doc_fixes

Add documentation