Rework the NodeInterval class to abstract the custom logic and leave that class very generic.