misc: code cleanup