refactored findMostCommonPitch with better var names and got rid of redundant logic