#27 A bit of refactoring.