Fleshed out intervals.go ready for testing especially Merge().