Cut the running time from 30 seconds to 15 seconds on my quadcore laptop by multithreading the bulk of the keyword processing.
code cleanup