Work in PhoneGap Android.
Cleaning the code.