Added error validation and changed to ui-map