Some code clean-up + make it possible to cancel UpdateChecker thread.