Defining checking rules and implementing Exam and Apply logic for some rules.