Move loader callbacks out of the top level of MainActivity.