Clean code, fix syntax, and remove inconsistencies in NeuQuant.js and LZWEncoder.js.