Merge pull request #1 from isometry/master

_MAX_RESULTS shouldn't be hardcoded.
No numbers (except 0 or 1) in the code.