Refactored code, connected dom, content and background scripts.