clean unimodularity check