Added Appendix and fixed an example in tutorial.