Changed primTable from function pointers to functors