Optimization of the Mechanical and Electrical Performance of a Thermoelectric Module