util: code cleanup