cleaned ie specific code and put it all in one file