Along those lines, we need to figure out how to interact with this from other plugins. Basically, we need a JS API of some sort. This code works for what it does, but is it the right start to such an API?