Completed the map control.

Included bug fixes.