Encapsulating of searching for min/max
Renaming