Replace word-sized integers with machine words

TODO