Fix loops in watch.js
- Use standard for when iterating over arrays (instead of for in)
- Add hasOwnProperty check when iterating over objects