Put recoverMelPower function in a separate file.