Optimizations and IE fixes.