refactored map.js to be a self-executing function to better encapsulate it. Now it exposes a single object, mapMaker with 2 public functions