Some Minor Refactoring