Updated spec to interface
Updated to spec
Fixed json serialisation.