make runtime.c compile cleanly and whittle down compile errors in core.c