Never remove media attribute on link tags

You don't provide rationals why you decided to remove the media attribute of link tags unless their value is 'print'.
The media attribute can be used for much more than providing print style, I use it for media queries to achieve responsive designs (view source on http://lagammebeaujolaise.com ).

I suggest not cleaning up style tags at all, this isn't worth the trouble.