Define interface

This adds the definition of the public interface. Comments welcome!

@neithernut 
I guess this is a minor fix, we can add it afterwards... I have no time atm to dive into the code again. Anyway, you're righ!