Tweak: Changed a bunch of pointers to references.