Added environmental variable functionality