fixed undo and finish draw
added AmatGeoBase abstract model. Modified existing models and apis accordingly