Fixed documentation.
Refactored to clean tests up a bit.