Modify plugin functions so plugins can reside in node_modules folder