Changed to use unsigned indices.
Adds dynamic arrays (ArrayList).