Clean up and documentation.
Fixed a bug, added links to coverage output.
Rearranged some code.