Update root/lib/index.js to match plugin conventions

Changed events & ext function check assertions too.