Optimization of Thermoelectric Modules and Thermal Transport in Thin Film Semiconductors