Add vectorSum function, clean up codes