Rearranged some things in MainActivity