minor cleanup/refactoring