Add support for loops.