Rework of kern to work with rust-core