Added constructor to set number of fractions.