Change struct with single static function to function.