Add util.rs

Apparently I missed this when I factored out the equivalency check