Initial support for loops

Signed-off-by: Daniel Francis <francis@sugarlabs.org>