Changes for performance improvements and layout problem in IE6

I made these changes in the 3.3 track and have recent carried them forward to 3.4. I thought I'd contribute them back to the main branch.