Add tutorial

- Add comprehensive tutorial
- Minor fixes