Resolve some inconsistencies, correct a few minor errors, and document the 'ready' event.