Client added and some minor changes