Having just stated that Hashem spoke with Yisrael directly, how can the Torah now say that Moshe was a medium?
Ramban #1: The current Pasuk is referring to the number of times Moshe ascended and descended Har Sinai prior to the Aseres ha'Dibros. 1
Ramban #2 (citing Ibn Ezra): The current Pasuk is referring to after Ma'amad Har Sinai, when Moshe began to act as the intermediary between Hashem and the people. 2
Ramban #3: Whereas the previous Pasuk was referring to the first two of the Aseres ha'Dibros, the current Pasuk is referring to the last eight Pesukim, which Yisrael were unable to understand when they emerged from the Mouth of Hashem. 3
Moshav Zekenim: The previous Pasuk means that they heard Hashem's voice, but He did not speak to them; they heard Him speak to Moshe, like it says "Yishma ha'Am be'Dabri Imach" (Sh'mos 19:9). 4
Why does the Torah attribute their not ascending Har Sinai to the fact that they were afraid, when Hashem had prohtibied them from ascending?
Ramban: Because they were afraid to ascend even the section at the foot of the mountain that they were permitted to ascend. 1
See Oznayim la'Torah who elaborates.
How does the word "Leimor" fit in?
Rashi, Ramban #1 (citing Ibn Ezra #1), Rashbam and Seforno: It refers to Pasuk 4 "Panim be'Fanim Diber Hashem Imachem .... Leimor". 1
Ramban #2 (citing Ibn Ezra #2): It refers to the phrase (in the same Pasuk 2 ) "Lehagid lachem es D'var Hashem ... Leimor".
Ramban #3: - It belongs where it is; "ve'Lo Alisem ba'Har Leimor" - meaning that you did not ascend the mountain 3 because you were afraid of the fire - as you specifically stated'. 4
Targum Yonasan: It follows "ve'Lo Alisem ba'Har" and translates as 'and you did not ascend the mountain when Hashem said "Anochi ... " '.