Use range() and "in" operator instead of MIN/MAX constants

This is related to #8.
Revert "Use range() and "in" operator instead of MIN/MAX constants"

This reverts commit 99dd98ef43c291903ad36f5a967eb981ee849b09.

Too bad, "n in xrange(...)" seems to have O(n) runtime in Python 2,
making it very slow for nanosecond checking...

See #8.