Some optimizations to IOClient and more testing of IOclient