Improve how env vars are set up using both the .env and .env.php files. Improved documentation in comments.