Reformat code.
Stop from creating duplicate arc instances.
Remove unnecessary assignment.
Remove indirect function call.
Standardize generic parameters.