changes to javascript bindings, now uses rulesets as "global" scope