Restructured server code and added simple protocol buffer compilation