remove unnecessary code/kernels