Some fixes, some cleanup, and a sum() function for vectormath