CODE: Minor reorganisation of some code for electricity supply.