code cleanup: new class for server messages, refactored ServerJSONBuilder usages