Moved another bunch of mdlib utils to C++

No match.