Core: Mark some module functions as static

Silences a load of warnings if ever compiling with -Wall or prototype warnings. Also has the side benefit of making it more indicative of which functions are used externally.

Confirmed to compile fine on OSX.