Added calculateFrameCount() and calculateDuration(); close #22