Remove unused images and add relay logic