Changed reduce, margninalize and maximize. Wrote MAP function. Wrote a new version of product function