Moved LUT generation into a separate module