It would be nicer to change this to use Option[Int] instead of hiding the case where it's not specified in `Int.MaxValue`. Not a huge thing but it would improve comprehensibility here.