Maps API

Several bug fixes