Minor refactoring and bugfix for extractPersonalAchievements