Add unit tests for multi. Fix issues found.
Add unit tests for byname, env, loader and map handlers.