Reworked zero validation and array sorting

* Simplifed error checking to return Message objects on error
* Added array sorting to all dictionaries to normalize data

Change-Id: Iffa607d562a391525ab4906d830099aeb41500d6
Merge "Reworked zero validation and array sorting"