Reverted custom-kernels.cpp back to old version (accidentally overwritten by Phil when merging generator)