misc: more code cleanup