Changed lookup tables to ints from bytes.