Implemented basic UI thread class.