IE reloading fix & code cleanup