More cleaner way to declare module types
Fix API key fetching