adding code coverage utility and fixing some gaps in coverage