Switch to core-lib with loop primitives

Signed-off-by: Stefan Marr <git@stefan-marr.de>