Made changes to initialize function - consider adding ctrl flow to affect order of function calls depending on conditions such as API fail/success, config failure, etc.