Moved all interval functions to intervaltools