Create UIfunctions.py

Functions related to the control of the UI after being passed from the main thread.