Rewrite the name handling code to be more intelligent re _MAR and SURN.