[refactor] Ensuring integer-ness of min and max offsets.
[refactor] Using var names instead of array indexes for POS.