Refactor MemAccess struct, create macros.