move the update checking into the main javascript file