Fix tests and introduce range.