Pointer to reference refactor