Move map js to own file