Don't use global object, instead use closure (similar to opts_knit)