Further minor refactoring