Split out window highlighting logic into separate file.