Use named function literals, move export statements above function declaration