Rearranged kernel, allowed for kernelGarbage to be a variable size