Server  mocked up. Runs a little bit, but needs refinement.