minor: removed duplicate imports
minor: marked _get_image_name as private and moved it to top (away from the view functions)