Aligining memory allocations, moving kernels to headers for potentially better inlining