Reorder methods
Merge duplicated code
Decode json with error verification