Adds pref listener. Removes dirty timeout from content script. Improves main script.