tidying up _util.java with better comments and less dead code