adding env var for token, plus small changes