fixed MostFrequentResolution, added MostFrequentResolutionTest, some refactoring