Added in new interface and restructed things a bit