Minor fixes on for translation methods.
Add tests for nested for loops.