Updated manual.tex

- fixed typos
- fixed code examples