cleaned up and streamlined MEMORYWR and DRIVEWR