Moving onReady() to actually when it is ready
Making test page work better!