Added comments to kernel functions.