Refactored to make Range and FloatRange a single class rather than separate ones