Moved core functions to background thread