Minor refactoring of 379