The files load in the order in the .toc.
The "NameSpace" is already a table passed in by Blizzard so you don't need to create a second one.
File 1
Lua Code:
local addonName, NS = ...
NS.a = {}
File 2
Lua Code:
local addonName, NS = ...
local function LocalTest(val)
print(val)
end
NS.a.Test = LocalTest
File 3
Lua Code:
local addonName, NS = ...
NS.a.Test("Hi there.")
you don't add the () when assigning the function unless you want to assign the result of calling the function.