Bit of clearer code on name setting function