Ported the logic for range_sum_equal, that allows validation of a range
action. But there's a lot of cleaning up to do. Many pylint errors.