Change class creation mechanism
Maxmin beta
Inline Distance() function