More various refactoring