Make functions which do not need to be exported static

And remove one which turned out to be unused entirely.