First version of the rulestore implementation