IE 6-8 fixes & ref tests