Update downloading bugs fixed

Code formatted; added handlers for downloading errors; fixed bug with
apply-update launching