Optimize Memory

Credit: ParanoidAndroid