made distortion documentation

and the code a bit nicer