more comments, cleanup, refinement