Some small refactoring"