More thorough name handling