Added raytrace compaction.