Added environment setting, and database connection script