Small bugfixes. Finalized the example.