Refactor rule creation/checking, add res dict for evaluation results