Minor refactoring of the web scripts tutorial code