Added replaceWindow functionality + preparation for sending binary screenshots in matchWindow.