Replace for...in with for. Closes #1