Using array.push.apply(array,otherArray) for faster append. Added Utils.
minor loop fixes
minor loop optimization for SAP