Use validity direction and image ids directly from asset and read values from updated asset returned by api.

Also fixed several bugs related to asset property saving.