Put coverage templating logic into separate module