Implemented modern way function calls in background threads. Working with GUI from the main thread.