An implementation of an interval tree