HV-808 Fixing ModCheck and CPF and HV-809 Improving ModCheck

Fix the JIRA HV-808 with code updates from #263 e #265 feedback
Improve ModCheck based on JIRA HV-809 and code updated from #268 feedback

@gunnarmorling sorry, but I will create only one pull request, please review if the commit history is the way you want