Slight refactorifying.