Removed int ng; in kernel.hpp