json serialization cleanup