Performance tweaking and IE 7 compatibility