Added comments, rearranged some lines, no functional change