Added inter and diff

Will add more functions. Working on tests.