Refactoring some utility code