Simplify it a bit, hopefully make it clearer, better var names, use proper types for arrays of vectors, etc. No behavioral change expected (except for corner-case of vertices being used by more than 255 edges, which were sort of 'clamped' to those 255 first edges for the smoothed position computation previously, now we use proper integer, which fixes that bug).