FIX Minor fixes and cosmetic changes to min/max