Made the character classes use constant values instead of hard-coding.