Various updates to make library compatible with gwt and order the map