Memory Leak and Wakelock fixes.