A bit of clean-up and commenting.

Signed-off-by: Afsheen Ghorashy <arghorashy@gmail.com>