Minor optimization of fraction calculation.
Moved big heap into a typedef for convenience.