Allow `params` to be a callable directly. Refs #5