WIP - handle multiple values

+ Saving WIP due to encountering issue with caProcessTemplateForIDs() function.
+ Converted some more magic strings to constants (sub-keys under "rules").