Restructuring Client.
Added checking for empty fields