base: code cleanup