Removed unused instance of ToJSON
Use map combinator to remove repetition