Refactoring.

Added an assert-form to make sure that we only evaluate numbers
within range. Also removed some old comments.