refactored tons of maps js