Cleanup lut implementation and fix analyzer warning.