Reshaped the strucure of the plugin. Added public methods for init, destroy, restart.