Changes autoResize to volatile
Fixed bounds check in normalizeIndex to use supplied arrayLength instead of countsArrayLength
Cleanup