Minor refactoring
minor corrections