rename ImageIndex to ImageRef
add let support to HOAS EDSL (explicit expression sharing)