Convert all remaining functions to use integers.