Added docs and updated interface.