Renames RuleLibrary
Implements type checking for the rule collection