Made it work with plugin

Yay, now we can make plugins!