Extensive optimization changes for raspberry pi and Trendnet modem: