Setting content script on master tab only
Reorganizing code
Reorganizing into common js app
Abstracting event triggering