Add some refactorings and devise