Structuring Energy Deals for Long-Term Viability