utils: code cleanup