Client/server part modified + some general polishing