Refactor word tables to use array constants