Remove untested toJSON function