Fix function references.
Cleanup new-profile a bit.