Added '@loop' special variable support and other related changes.