Reduce complexity of getName()