add comments, cleanup