Changed the way range works to make it store only the name instead of start/end dates (when not custom)

Fixed various other bugs, including min/max issues.