move map JavaScript to separate file