Avoid divide by zero where document is empty or small
Be explicit about guarding against divide by zero
Merge pull request #14 from mneilsen/master

Avoid divide by zero where document is empty or small