More work on plugin.js