small changes… mostly reodering and comments