Improve how code coverage is enabled and handled