Compact the code