offline images
code cleanup