Refactoring

Minor refactoring