Update example, fix bugs & update documentation