Locking fine now, client loading up ok, more testing of locking needed.
Need to sort out passing indexes back to the client because after records
are deleted the changes are out of sync with the table