Made changes based on code review. Removed too many uses of pointers that I put back.