Replaced defragmentation algorithm.