Restructuring kernel, removing buffers