Refactored classic skin splitter code to fix it for IE<9