Minor refactoring. (By @Flolagale)