removed g_update_gauge_energy, as this part of the code appears to be really not time critical