Separate functions

* event.js loads with tab, and inserts inject.js
Fix merge conflict
Refactored to be simpler (just one JS). Might use popup.html after all.