Optimizing the lookup table generator.  Brought LUT generation from 217 seconds to 100ms with the test files.