Remove obsolete code; refactor util tests