Software Analysis and Development for Energy Efficiency in Mobile Devices