Small code cleanup

I have a feeling that this whole 'inline image' thing already needs a
redo.