cleanup rest service and change json contract to be []byte instead of string