About the tokenize part: I edited this crap like 20 times, and I realized I didn't need to tokenize :\ Forgot that part though.
Also I don't really like sockmark and aren't you the one always saying use hash tables? :p
%wea.err is set when you give a bad search and it doesn't return anything.
Updated