Quantum and Thermal Effects in Nanoscale Devices