Various improvements

I've made some improvements to this plugin. It now:

* Has support for multiple groups
* Removes need for repeating labels
* Uses a safer iterative loop

I also made the data initialisation use literal array syntax instead of calling push multiple times.