Code cleanup and added GPU and fan control