OSUtil and related refactoring