Renames sum of squares function and adds static and const qualifiers to variables