mat -> util and misc cleanup