Remove usage of method reference in exercises.