Adding Maps and a bunch of JS logic