Several refactoring