Merged in changes from development repository:

   Finished the functions needed in the thread function |pull_request|.