Some changes in sample lesson creation script.
Some bugfixes.