cleaned up compressor code