Two routines to combine all intervals for a given orbit, and some changes to a few other routines to make them more flexible