Refactoring exporter and tidying up examples.
Fixing bug in determining position where NonTerminal was recognized.
Small addition in the comment.