Added code for plugin and widget