Fix array expansion now that newArray doesn't allocate an extra slot.

Signed-off-by: Timo Kinnunen <timo.kinnunen@gmail.com>
Add missing size method.

Signed-off-by: Timo Kinnunen <timo.kinnunen@gmail.com>