Refactoring data server API to be RESTFUL, refactoring packet encoding and decoding to be explicit