Cleaned up function names, suppressed some variable calculation messages
Found some existing functions to check my numbers against.
Cleaned up some function calls.
Corrected dot product calculation.