Set up map code, added some observations on mini mongo and some scoped functions.
The life cycle of map management should take place inside the rendered function.