cleanup of RG-266; created Metric model and added json serialization