Task: move the API export code to its own function instead of having the implementation in main(). Similar was done for the API import code in this commit, which can be referred to for an example.
[x] API export code moved to its own function
[x] New function named similarly to the export function
Task: move the API export code to its own function instead of having the implementation in
main()
. Similar was done for the API import code in this commit, which can be referred to for an example.