Updates to use case classes for json serialization