Moved the classes fetching functionality to an AsyncTask to make it UI thread independent.