Made ApplyKernel a bit more flexible by being able to pass default value as parameter