Merged the new plugin system from branch plugin-system.