Fixed some obvious mistakes, but I'm still not sure if this plugin is supposed to be finished... lots of duplicated code everywhere, looks like work in progress.
Fixed the plugin enable and disable command, see ticket #52