Reworked update client and insert client functionality.