Improve constant names, values, and descriptions
Use if...elif... to make logic clearer
Fix range_detail
Fix the order of ALLOW_OPTIONS in forms