Just some refactorings