Add option to compact the database