Change to pushing the object literal into the array, not some temporary object. Just simplifies everything.