Move functions in file out of global scope.