Refactoring / minor changes