removed all old cost functions. They did not use helper functions and were hard to maintain
Made most of the changes requested for pull request.
Still need to move blending and intrinsic cal demo to different repository