Some minor refactoring (#31).