Adding return values and documentation.
Merge pull request #5 from Stanford/SSP-46

Adding return values and documentation.