rename a series of compound functions

This patch ensures a consistent naming scheme. That is, a function that is to compute foo(bar(x)) is named as foobar (instead of barfoo). For example, we use sumsq instead of sqsum.