Improve the code structure, add compressor settings with ratio

The compressor is still as bad and wrong as before.