Refactor the code for IE6 support.