Moved environment api to its own folder