Implement ready event. Fixes #102