Use the same stats calculation as the API
Use node-style callbacks, so we're error-aware.
Merge pull request #42 from LocalData/filter-fix

Use the same stats calculation as the API