Changes to plugin logic
Comments added