further improvement of tutorial and module example code