Refactored offset() somewhat, hopefully to be better with negatives.