almost compilable backend without network state machine and some minor bugs like no king support etc.