Code coverage2

Didn't know how to continue on the other pull request, so just let me know what you want to do and we'll do that.

For now, figured to give you the update code, rebased against master, with a few more issues.