Fixed MD formatting:

Another possibility is to do something like stripping the last '_' in a name and then calling the field ref_. This would avoid the need to write a full toJson() method...