Add maxIndexMay function (similar to minIndexMay)
Small refactorings (incorporate more of ClassyPrelude and squash some warnings)