Cleaned up some edge cases with infinity, the logic seems more intuitive now