base protocol implementation (dirty); basic test client application, etc