Moved logic out of MainActivity

Now uses view-less fragment to handle logic and asynctask.