small code refactor for more redability and added more error checks on unmarshalling json data
small code refactor for more redability and added more error checks on unmarshalling json data

dawanda/mmsd,dawanda/mmsd