Simplified the interface.

Added a .mli that restrict the visible interface and added some methods
to handle sub-commands more easily.