Fix empty image tag and warnings

Removed what looks like legacy code