Improvement after NTNU: TODOs,simpl. req.

- don't require the map not to be visible outside the function