Refacor and complete the JSON interface.