Remove unnecessary use of references