EDIT - Minor refactoring