Reworked content make a class Map and then added functions to prototype.