- Refactored to use deviceReady event