Tidying up for kernel inclusion