Added qb_run_in_main_thread()
Added clean-up routine