Set has_loaded also files where a window key had to be used.
Added minor comments