Added dynamic creation of references. YAY!