Some other small refactoring