Created a map where all ids and pointers of plugin instances will be stored.
Added function which stores id and pointer of plugin instance to a map.
Added function in order to delete id and pointer of a plugin instance when tab is closed.
Added function that checks if pointer exists.
Updated error_notify and notify functions in order to use callback functions only when pointer exists.
Created Invoke function in order to use callback function only when pointer exists.
Added missing interruption points in resetLeonardo function.
Modified try catch blocks in doflash function.