Though not an outstanding student and composing little, Nielsen progressed well in violin under Valdemar Tofte (1832–1907), and received a solid grounding in music theory from Orla Rosenhoff (1844–1905), who would remain a valued adviser during his early years as a professional composer. He also studied composition under Gade, whom he liked as a friend but not for his music. Contacts with fellow students and cultured families in Copenhagen, some of whom would become lifelong friends, became equally important. The patchy education resulting from his country background left Nielsen insatiably curious about the arts, philosophy and aesthetics. But, in the opinion of the musicologist David Fanning, it also left him "with a highly personal, common man's point of view on those subjects". He left the Academy at the end of 1886, after graduating with good but not outstanding marks in all subjects. He then went to stay with the retired Odense merchant Jens Georg Nielsen (1820–1901) and his wife at their apartment on Slagelsegade as he was not yet in a position to pay his own way. While there, he fell in love with their 14-year-old daughter Emilie Demant. The affair was to last for the next three years.