Just a couple other things to notice, besides jack_gvr great posts.
On the regular altered notes from church modes, I recommend important Schoenberg's book "Theory of Harmony" (must read for a classical musician, IMO). Just check Chapter X title: "Secondary Dominants and Other Nondiatonic Chords Derived from the Church Modes". He explains the development and use of several non-diatonic chords in major/minor keys as a heritage from the Church Modes altered notes (mainly leading tones from the modes). This explains some chords jazz theory requires some weird explanations to me, while it is easy if you think as counterpoint.
It is also important to notice that the ancient Greek Dorian is not the same as the modern Dorian. They used a structure of tetrachords and their scales reference where descending instead of ascending. Our modes come from the church and the Greek naming is probably because of the Renaissance fashion, I guess.
I never discorvered when and by whom Locrian naming was inventend. Classical musicians, including Schoenberg in his book, always called it Hypohrygian.