Adding distance filter and initialize method.
Merge pull request from forrestgrant.