Updated documentation and idiap type annotations.