Beware of mixing upper case and lower case in your function names. For example, when you define the M3() function you use upper case. But when it is called from the "in editor" if statement it is called with lower case m3().
Some people claim that the case of the function name and the upper/lower case used in the file name matter. I was not able to see any effect of upper/lower case in the file name, at least on my couple of PCs. But I did not test on Win8 or Win10, so I cannot guarantee there ISN'T as issue. To be safe, keep everything using the same case (I use lower case).
Bob