Map javascript updated + clean-up