Add Interval class
Add distance calculator
Fix test failure