Complex sentence: When he had finished gymnasium as the best student in his class he thought for a while joining the Benedictine order but he soon abandoned his idea, because his great interest for physics prevailed, and left for Vienna in 1853 to study mathematics and physics.
Split into simpler sentences: When he had finished gymnasium as the best student in his class he thought for a while of joining the Benedictine order but he soon abandoned his idea, because his great interest for physics prevailed. He left for Vienna in 1853 to study mathematics and physics.