Minor changes made to interval_integrate, non_pairs_removed and list_of_intervals changed to just intervals, also moved the interval duration to the end of the list, to make removal later easier.