Updated the way variables are taken from env