Added replaceWindow functionality.