Refactor: remove unnecessary function. Change declaration of RegisterTask object and calling of 'doInBackground' function to only 1 line