Better documentation of this code.

Better documentation of this code.