fixed formatting and added comments

fixed formatting and added comments

Signed-off-by: Robert Coscia <coscia@g.harvard.edu>