smaller refactoring stuff