Added comments to plugin code