Refactor ic2 energy storage fix to use readable constants, also make it sync