Added refaddr, refaddr_of, added more tests