Added in some json processing