Finish refactor of plugin mappings loader. Fixes #642.