How to get good UV's and vertex normals?

 From:  ycarry
4515.7 
Yes anthony please take the time to update your code
...for Blender 2.6 (incoming) !