Avoided some bugs
Improved server and client