more refactor cleanup/fixes