Added comments and rearranged some variables