Server: replace var_dump and optimise escape algorithm
Client code refactoring: args escape improved