Added an interface. Need to add consistency checking to the interface
methods and probably some other stuff needs to be done, but I can't seem
to remember cause it's a bit late.