fixed json response handles, added server documentation in comment, fixed...

- fixed some of the response handles
- fixed all the long [] to json array before payload