added api key env variable
made change to how variables were declared for better code style