Add proper jsdocs
Fix problem with switching to the particular tab on different window