Added composition function, some changes to Polynomial.