Rewrite parse_name.

Make parse_name not allocation multiple arrays which it
is just going to throw away.  Build up the name as it
goes along.