Fix a map changing issue in Firefox and also add a .gitignore file

Probably just Firefox doesn't have this overload for "removeEventListener" in whatever API.