fixing some tests + small similarity detection changes