Implement atlas compaction