Removed unneeded ref for parameter.
Added casts.
Added overloads.
Added OutlenMin assignment.