cleaning up my kernels a bit
important that these functions are always inlined
cleaning up the headers so they can be included in C programs