Updated comments, generally improved clarity