Fix app cache events, safari doesn't notice "updateready" event.
Other minnor changes.