Improvements/refactorings.