Added device discovering and moved some code around
Next time, add server and client handlers and hook up buttons properly