Simplify image-handling.
Better error message for unbalanced HTML tags.