Changed usage of Model to MapModel. Fixed nullpointer.
Resolved merge conflict