Iterate with foreach in create(), leftover $mode deleted.

+ create() should iterate $frames with foreach() not for assuming direct
  indexes from 0 to < count. 
  (The array keys can be anything, and should not affect the results.)
+ Removed unused $mode from reporting ERR02.