Adding fragment length calculation.
Merge pull request #5 from fnothaft/calculate-lengths

Adding fragment length calculation.