Fixed syntax to be more familiar, with curly braces.
Bugfix and nested loops example.