Add some refactoring