fix bug in __main__ script, python file location, integrate code changes into tutorial (inline snippets)