Refactored server/util file