Contour

Fix acmemb function and improve tests