Made media query removal more efficient (ran out of memory in IE8 with previous implementation)