Refactored CSS optimizer