removed needless intermediate variable
removed valid_ranges (unused variable)
Merge branch 'master' of https://github.com/cypressf/rescuebot
Adding comments for clarity