Refactored some of toggle.js and historical maps.