Added Window type. Made UpdateThread private.