Motion of polymer ends in homopolymer and heteropolymer collapse.