Params in functions to be registered const&, minor fixes.