Changed the interfaces a little (tests first!)