Updated setRule to handle passing of parameters

Ran into a problem where setRule couldn't handle the passing of
parameters.  Added func's class for a few general functions which uses a
fill_keys function which works slightly different than the official
array_fill_keys