common: code cleanup