Fixed underscore 1.5.2 issue which do not allow to iterate over non object data type.

Minor cleanup and fixes.