Added version number for updating doc and refactored the UI thread