Updated to pull in api key after user enters settings