Cleanup on deactivation

To avoid conflicting with my other pull requests, this branch was branched off of my enable_ie_support branch. Check the last commit for changes related to this pull request.
Can you add something about this in browser inconsistencies? Would also be nice to have an isolated test case for this? There are examples in the BROWSERINCONSISTENCIES.md file