rewrote window.Comparer
fixed merge conflicts
completed merge