Replace inline styles, flatten selectors, use block-grid for images