Biogas-to-energy technology