Added tests for sum function

Added test for some function.  Cleaned up some naming.