Kernel Compilation

Kernels may now have helper functions and can make use of global macros, etc.