Switched to use Int instead of Word32 for indexes.