Finished plugin, needs maybe a few more event handlers