Tinkering with a JS plugin system