Treating pigmentation and unwanted hair