added composing functions, and generated a test case for each. speed
improvements on most functions.