Changed pointers to references