Moving the logic of the percent coverage to subfunctions so that we can use it later if necessary.
Made this a generic test.
Merge pull request #68 from juliema/subfunctionalize

Subfunctionalized the logic of PercentCoverage.