Currently undergoing heavy refactoring of weights computation and kernel datatypes towards functors instead of raw function pointers. Still some bugs to iron out.