Refactor PlugExtensions