How Do Energy Transactions Work and What Are the Key Legal Considerations?