Some refactoring #2