Refactor arc code.
Fix broken images handling on IE.