remove some uses of pointers (need to continue...)