Updated API
Added handler for onReady