Updating with latest changes and adding .env file support