Implemented random function to randomize ID for each window to easily select the right window when closing it and appending thumb-pics ETC