Added helper variables inside for-statements.
Cleaned up for-tag.