Moved the communication code to the gui and finished some functions
Moved the communication thread connection to the light thread after devices is guarenteed to be connected