Make some refactoring