save mapData to DB works now correctly

other improvements
added SugarJS for client side