A little cleanup
Check if we already have the wakelock before acquiring it
Merge branch 'master' into mock