Yet more C-ification and compile fixes - merge routine missing