Added new docs on writing kernels