added controller functionality and tests for MapObject