Consolidate memory access instructions with a class.