Implemented review comments to abstract out validate params and use set_image_os_type