add a method to return both boundaries of an interval.
improve Factory methods for various types of Node.