Add macro for running kernels, add ability to enable/disable shared memory, cleanups