Fixing a bug in collections.js, where we (I) was +1'ing rather than -1ing  to obtain an array index position. Also updated utils.js. The next commit will hopefully unify util.js across the projects