Fixed threading problems so that the led thread and controller thread can run at the same time.