rewrote the maps code to make it easier to add content