even more refactoring, making the codebase smaller