Better link insertion.
remove extraneous file
Handled no images case.