many changes to client code, some code reducing and simplifications