Organize functions into two new Config and Generator modules