CodeCoverage work and lots of bug fixes