Changed windows to use id numbers so that it works when they are renamed