improved PutI and GetI instrumentation + clean the code