Moved toJSON to Model