Made pretty name implementation neater.