Multi-client seems to be working, some code revised